<template>
  <div v-if="getVal" class="stage-container" :class="getVal === '是' ? '' : 'stage-container-2'">
    <div>
      {{ getVal }}
    </div>
  </div>
</template>

<script setup lang="ts">
const props = defineProps({
  rowData: {
    type: Object,
    default: () => {}
  },
  column: {
    type: Object,
    default: () => {}
  }
})
const getVal = computed(() => {
  const val = props.rowData[props.column.prop]
  if (val === 1) {
    return '是'
  } else if (val === 0) {
    return '否'
  } else {
    return val
  }
})
</script>

<style lang="scss" scoped>
.stage-container {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px 3px 3px 3px;
  font-weight: 400;
  font-size: 12px;
  border-radius: 5px;
  color: #1fbb1d;
  div {
    padding: 2px 18px;
    background: #edfaef;
  }
}
.stage-container-2 {
  color: #bb2d1d;
  div {
    background: #fbdcdc;
  }
}
</style>
